﻿<?php
class Former extends CI_Controller{
	function __construct(){
		parent::__construct();
		$this->load->helper("url");
		$this->load->database();
		$this->load->library('session');
		}
	function index(){
		$this->load->model("Former_model");
		$data['product']=$this->Former_model->get_message_desc('works');//获取作品展示
		$data['team']=$this->Former_model->get_message_desc('team');//获取工作团队
		$data['contact']=$this->Former_model->get_message('contact');//获取联系我们
		$data['aboutus']=$this->Former_model->get_message('aboutus');//获取关于我们
		$this->load->view("former/index",$data);
	}
	function check_enroll(){
		$this->load->model("Former_model");
		$flag=$this->Former_model->insert_enroll();//报名
		if($flag){
			redirect("Former");
		}else{
			echo "报名失败";
		}
		
	}
		
		
		
		
}

	
	
	
	
	
	
